委托验收

master
anthonyywj2 3 years ago
parent f4286ead67
commit 9a4d0a8aa5

@ -1,5 +1,6 @@
package com.glxp.api;
import com.glxp.api.admin.util.DateUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@ -15,6 +16,7 @@ public class ApiAdminApplication extends SpringBootServletInitializer {
SpringApplication application = new SpringApplication(ApiAdminApplication.class);
application.addInitializers(new ToolApplicationContextInitializer());
application.run(args);
// System.out.println(DateUtil.getStartTime("17:30:01")+"");
}

@ -89,6 +89,27 @@ public class InvWarehouseController {
return ResultVOUtils.success(invWarehouseEntities);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterNext")
public BaseResponse filterNext(FilterInvWarehouseRequest filterInvWarehouseRequest) {
filterInvWarehouseRequest.setPid(0);
filterInvWarehouseRequest.setStatus(1);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterGroupInvWarehouse(filterInvWarehouseRequest);
return ResultVOUtils.success(invWarehouseEntities);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterByUser")
public BaseResponse filterByUser(FilterInvWarehouseRequest filterInvWarehouseRequest) {
AuthAdmin authAdmin = customerService.getUserBean();
filterInvWarehouseRequest.setPid(0);
filterInvWarehouseRequest.setStatus(1);
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());
List<InvWarehouseEntity> mInvWarehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest);
return ResultVOUtils.success(mInvWarehouseEntities);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterAllLocInv")
@ -409,7 +430,7 @@ public class InvWarehouseController {
*/
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/bindThrWarehouse")
public BaseResponse bindThrWarehouse(Integer id, String thridWarehouseId, String sysId) {
public BaseResponse bindThrWarehouse(Integer id, String thridWarehouseId, String sysId) {
if (null == id || null == thridWarehouseId || StrUtil.isBlank(sysId)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}

@ -27,4 +27,5 @@ public class SyncDataSetEntity {
private String busTypes; //单据类型
private String syncIp;
private boolean sysUser;
private boolean entrustAction;
}

@ -16,7 +16,7 @@
INTO sync_data_set(id,typeBus, typeScan,
typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp, basicThirdInv
, basicThirdBusOrder, orderScanFinish, dbDiProducts,downstreamEnable,syncTime, syncDownloadTime,
orderUnReceive,orderUnCheck,busTypes,syncIp,sysUser)
orderUnReceive,orderUnCheck,busTypes,syncIp,sysUser,entrustAction)
values (
#{id},
#{typeBus},
@ -31,7 +31,7 @@
#{basicThirdBusOrder},
#{orderScanFinish},
#{dbDiProducts},#{downstreamEnable},#{syncTime},#{syncDownloadTime},
#{orderUnReceive},#{orderUnCheck},#{busTypes},#{syncIp},#{sysUser}
#{orderUnReceive},#{orderUnCheck},#{busTypes},#{syncIp},#{sysUser},#{entrustAction}
)
</insert>

@ -7,6 +7,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class NormalTest extends BaseApiAdminApplicationTest {
private static final Logger log = LoggerFactory.getLogger(NormalTest.class);
@ -27,4 +30,30 @@ public class NormalTest extends BaseApiAdminApplicationTest {
}
public static long getStartTime(String startTime) {
final SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
final Date datetime;//将你的日期转换为时间戳
try {
datetime = sdf.parse(startTime);
final long time = datetime.getTime();
long curTime = System.currentTimeMillis();
if (curTime - time > 0) {
return 24 * 60 * 60 * 1000 - (curTime - time);
} else
return time - curTime;
} catch (ParseException e) {
e.printStackTrace();
}
return 0;
}
@Test
public void testTime(){
log.info(getStartTime("17:30:01")+"");
}
}

Loading…
Cancel
Save