app 小包干bug修改

This commit is contained in:
fl 2025-06-25 15:59:01 +08:00
parent ec720453fe
commit aa59ba3c26
5 changed files with 25 additions and 69 deletions

View File

@ -101,7 +101,12 @@ public class ContractNoSignAdapter extends BaseAdapter {
}
}
holder.proName.setText("工作地点:" + bean.getWorkAdress());
holder.isXbgGroup.setText("是否为小包干班组:" + bean.getIsXbg());
if("1".equals(bean.getIsXbg())){
holder.isXbgGroup.setText("是否为小包干班组:是");
}else{
holder.isXbgGroup.setText("是否为小包干班组:否");
}
holder.partyA.setText("甲方:" + bean.getPartA());
holder.effectiveDate.setText("生效日期:" + bean.getEffectDate());
holder.signingDate.setText("签订日期:" + bean.getSigningDate());

View File

@ -901,23 +901,6 @@ public class FaceAttendanceFragment extends BaseFragment implements ViewTreeObse
attendanceBean.setDataType(checkMode);
attendanceBean.setContractId(contractId);
// 先查本地数据库是否有该人员考勤若有则不在打卡若无则查询后台数据库是否有考勤数据
List<FaceAttendanceBean> lists = faceAttendanceDao.selectFaceAttendanceByIdnumber(attendanceBean.getCurrentDay(), compareResult.getIdCard());
// if (lists.size() > 0) {
// XToastUtils.warning(compareResult.getUserName() + "今日已考勤!");
// } else {
// selectFaceByIdNumber(attendanceBean.getCurrentDay(), compareResult.getIdCard());
// if (isAttendance == 1) {
// XToastUtils.warning(compareResult.getUserName() + "今日已考勤!");
// } else if (isAttendance == 2) {
// XToastUtils.warning(compareResult.getUserName() + "今日为休息状态!");
// } else {
// //TODO 考勤成功之前先判断她有没有打这种卡的权限
// faceAttendanceDao.addFaceAttendance(attendanceBean);
// XToastUtils.success(compareResult.getUserName() + "考勤成功");
// }
// }
if (checkMode.equals("1")) {
faceAttendanceDao.addFaceAttendance(attendanceBean);
XToastUtils.success(compareResult.getUserName() + "考勤成功");
@ -925,15 +908,15 @@ public class FaceAttendanceFragment extends BaseFragment implements ViewTreeObse
String number = attendanceBean.getIdNumber();
List<IDCardBean> listUser = UserFeatureManager.getUserFeature(getActivity());
IDCardBean idCardInfo = new IDCardBean();
assert listUser != null;
for (IDCardBean bean : listUser) {
if (bean.getIdNumber().equals(number)) {
idCardInfo = bean;
}
}
System.out.println("idCardInfo=" + idCardInfo);
// 判断是否签订合同
if (idCardInfo.getIsXbg().equals(0)) {
if ("0".equals(idCardInfo.getIsXbg())) {
XToastUtils.warning(compareResult.getUserName() + "未签订小包干协议!请打计日卡,或者重新签订合同!");
} else {
faceAttendanceDao.addFaceAttendance(attendanceBean);

View File

@ -399,12 +399,7 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
View custom = LayoutInflater.from(getContext()).inflate(R.layout.dialog_piecework, null);
final SuperButton cancel = custom.findViewById(R.id.cancel);
final SuperButton ok = custom.findViewById(R.id.ok);
final TextView content = custom.findViewById(R.id.content);
// 获取合同名称并赋值
// String name = getContractInfo();
// contract = custom.findViewById(R.id.contract);
// contract.setText(name);
builder.setView(custom);
final AlertDialog dialog = builder.create();
cancel.setOnClickListener(new View.OnClickListener() {
@ -449,9 +444,6 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
List<MapBean> contractL = lumpSumBean.getContract();
List<ProcessBean> processL = lumpSumBean.getProcess();
//假设选中的就是第一个
List<ProcessBean> process = lumpSumBean.getProcess();
List<String> contractList = new ArrayList<>();
for (int i = 0; i < contractL.size(); i++) {
@ -469,8 +461,6 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
// 这里可以获取并打印选择的值
String selectedValue = (String) adapterView.getItemAtPosition(name);
System.out.println("Selected value: " + selectedValue);
for (int i = 0; i < contractL.size(); i++) {
if (contractL.get(i).getValue1().equals(selectedValue)) {
MapBean mapBean = contractL.get(i);
@ -480,7 +470,7 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
List<MapBean> list = processL.get(i).getProcessList();
List<String> processList = new ArrayList<>();
for (int z = 0; z < list.size(); z++) {
processList.add(list.get(z).getValue1());
processList.add("工序:"+list.get(z).getValue1() + " => 桩位:"+list.get(z).getValue2());
}
ArrayAdapter<String> adpterPos = new CustomAdpter<String>(getActivity(), android.R.layout.simple_spinner_item, processList);
//绑定 Adapter到控件
@ -489,42 +479,19 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
procedure.setAdapter(adpterPos);
procedure.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int positionName, long id) {
// 这里可以获取并打印选择的值
String selectedValue2 = (String) adapterView.getItemAtPosition(positionName);
System.out.println("Selected value: " + selectedValue2);
for (int h = 0; h < list.size(); h++) {
if (list.get(h).getValue1().equals(selectedValue2)) {
String value = "工序:"+list.get(h).getValue1() + " => 桩位:"+list.get(h).getValue2();
if (value.equals(selectedValue2)) {
List<String> positionList = new ArrayList<>();
gxName = list.get(h).getValue1();
gxName = value;
gxId = list.get(h).getKey();
positionList.add(list.get(h).getValue2());
ArrayAdapter<String> adpterPos = new CustomAdpter<String>(getActivity(), android.R.layout.simple_spinner_item, positionList);
//绑定 Adapter到控件
position = custom.findViewById(R.id.position);
WidgetUtils.setSpinnerDropDownVerticalOffset(position);
position.setAdapter(adpterPos);
position.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
// 这里可以获取并打印选择的值
String selectedValue3 = (String) adapterView.getItemAtPosition(position);
System.out.println("Selected value: " + selectedValue3);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
}
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {

View File

@ -10,7 +10,7 @@ public class WorkConfig {
*/
// @Value("${environment}")
// public static String environment;
public static String environment = "local";
public static String environment = "test";
protected static final String GZRAMA_URL_LOCAL = "http://192.168.0.137:1917/hnAma/";

View File

@ -28,28 +28,29 @@
android:layout_marginTop="15dp"
android:orientation="vertical">
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:text="某某合同"-->
<!-- android:id="@+id/contract"-->
<!-- />-->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="合同"
/>
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/contract"
/>
<Spinner
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:text="工序桩位"
android:layout_marginTop="24dp"
android:id="@+id/procedure"
/>
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:id="@+id/position"
android:id="@+id/procedure"
/>
</LinearLayout>