|
@@ -11,7 +11,6 @@ import com.winsea.svc.base.security.entity.User;
|
|
import com.winsea.svc.base.security.util.AuthSecurityUtils;
|
|
import com.winsea.svc.base.security.util.AuthSecurityUtils;
|
|
import com.winsea.svc.base.workflow.entity.Workflow;
|
|
import com.winsea.svc.base.workflow.entity.Workflow;
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
-import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YException;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YException;
|
|
@@ -26,8 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
@@ -260,11 +257,14 @@ public class TradeWarehouseReceiptApplServiceImpl extends ServiceImpl<TradeWareh
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public void deleteTrageInfo(String id){
|
|
public void deleteTrageInfo(String id){
|
|
- this.deleteById(id);
|
|
|
|
|
|
+ TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl = this.selectById(id);
|
|
|
|
+ this.deleteById(tradeWarehouseReceiptAppl.getId());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 可用库存
|
|
* 可用库存
|
|
*
|
|
*
|
|
@@ -287,15 +287,16 @@ public class TradeWarehouseReceiptApplServiceImpl extends ServiceImpl<TradeWareh
|
|
String billNo = "";
|
|
String billNo = "";
|
|
String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date());
|
|
String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date());
|
|
String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date());
|
|
String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date());
|
|
|
|
+ String day = new SimpleDateFormat("dd",Locale.CHINESE).format(new Date());
|
|
int count = this.selectCount(new EntityWrapper<TradeWarehouseReceiptAppl>()
|
|
int count = this.selectCount(new EntityWrapper<TradeWarehouseReceiptAppl>()
|
|
.eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId()).and("date(create_date) = curdate()"));
|
|
.eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId()).and("date(create_date) = curdate()"));
|
|
int maxCount = count + 1;
|
|
int maxCount = count + 1;
|
|
if (maxCount < 10) {
|
|
if (maxCount < 10) {
|
|
- billNo = year + month + "00" + maxCount;
|
|
|
|
|
|
+ billNo = year + month + day + "00" + maxCount;
|
|
} else if (maxCount < 100) {
|
|
} else if (maxCount < 100) {
|
|
- billNo = year + month + "0" + maxCount;
|
|
|
|
|
|
+ billNo = year + month + day + "0" + maxCount;
|
|
} else {
|
|
} else {
|
|
- billNo = year + month + maxCount;
|
|
|
|
|
|
+ billNo = year + month + day + maxCount;
|
|
}
|
|
}
|
|
return billNo;
|
|
return billNo;
|
|
}
|
|
}
|